/**
 * 测试while语句
 */

public class TestWhile {
    public static void main(String[] args) {
        int a = 0;
        while (a<5){
            System.out.println("打印5次");
            a++;
        }

        int b = 1;
        int sum = 1;
        while (b<101){
            sum = sum+b;
            b++;
        }
        System.out.println(sum);

        int c = 1,d = c*2;
        int s = d;
        while (c<=10){
            s = s+c*2;
            c++;
        }
        System.out.println(s);

    }
}
